Version 3.0 Pro User's Guide |
|
Sending Mail: The Mail Demo Example |
Previous |
Next Contents |
Sending mail is a little different than most of the other operations in NetCloak Pro. The other directives create or modify files on your server, but SENDMAIL actually requires NetCloak Pro to make a TCP/IP connection to an SMTP server. Sending mail therefore has some unique problems.
The input form for the Mail Demo example is very simple, with fields for names, email addresses, subject, and so on, so it is not printed here.
Below is the Mailer.FDML file, which is more interesting:
1) <RESPONSE>"Response.html"</RESPONSE> 2) <SENDMAIL "mail.yourdomain.com" 3) "Your Name Here <you@yourdomain.com>" 4) "<REPLACE FromName> <REPLACE FromEMail>" 5) "<REPLACE CCName> <REPLACE CCEmail>"> 6) <REPLACE Subject> 7) </SENDMAIL> 8) Name: <REPLACE FromName> 9) E-Mail: <REPLACE FromEMail> 10) Phone: <REPLACE Phone> 11) Message: 12) <REPLACE Message>
Keep in mind that this example, unlike all of the others, will not work on your server without a couple of modifications.
Line 2 - The SENDMAIL directive is a little more complicated than other directives due to the number of parameters it requires. Here is where you must modify the example to work on your server.
The first parameter in quotes is the name of the SMTP server NetCloak Pro should use to send mail. Change this to the name of the server you would use with a normal e-mail client like Eudora.
Line 3 - The second parameter in quotes is the address that NetCloak Pro will send the message to. You should change this to your own name and e-mail address to make the demo work correctly. This can be any address you choose, including one inserted by a REPLACE command from a field in the user's input. These two fields are the only changes you need to make in order to get the Mail Demo example to work on your server.
Line 4 - The third parameter, also in quotes, is the address that the mail message is apparently from. In the example the from address is taken from the name and email address fields in the user input, but it could also be fixed in the FDML.
It is important to have a valid "from" address on the mail you send using NetCloak Pro. Without one, messages which are incorrectly addressed or are mis-routed can float around the Internet for days or weeks wasting bandwidth of mail servers.
Line 5 - The fourth parameter, also taken from name and address fields on the form, is the address of "carbon-copy" recipients of the message.
Lines 8-12 - Everything after the closing </SENDMAIL> tag is sent as part of the e-mail message. It isn't apparent here, but the line breaks and other formatting in the FDML will be preserved in the final message when it is sent.
Copyright © 1996-1999 Maxum Development Corporation http://www.maxum.com/ |
Previous |
Next Contents |